#{extends 'main.html' /}
#{set title:'Edit Profile | Find Food' /}
#{set contentClass:'edit-profile' /}

<h2>Edit Profile</h2>

#{form @Profile.save() }
	#{ifErrors}
		<div class="error">
			<ul>
				#{errors}
					<li>${error}</li>
				#{/errors}
			</ul>
		</div>
	#{/ifErrors}
	<p>
		<label>Open ID:</label>
		<span id="openid">${user?.openId}</span>
	</p>
	<p>
		<label for="username">User Name:</label>
		<input type="text" name="username" id="username" value="${user?.username}" />
	</p>
	<p>
		<label>Zip Code:</label>
		<input type="text" id="home" name="home" value="${user?.home?.zipcode}" size="5" maxlength="5" />
		<br/><span class="field-help">This will be your default search location.</span>
	</p>
	<p>
		<label></label>
		<input type="submit" name="save" value="Save" class="button" />
	</p>
#{/form}